<template>
  <div class="SearchStudent">
    <select name="searchType" id="searchType" v-model='searchData.searchType'>
      <option value="name">名字</option>
      <option value="age">年龄</option>
      <option value="gender">性别</option>
    </select>
    <input type="text" placeholder="模糊查询" id="searchValue" v-model.lazy='searchData.searchValue'>
    <input type="button" placeholder="查询" id="searchBtn" value="查询" @click='search()'>   
  </div>
</template>

<script>
import axios from 'axios';

export default {
  data(){
    return{
      searchData:{
        searchType:'name',
        searchValue:'',
        //每次搜索需要将页码改为1
        currentPage:1
      }  
    }
  },
  methods:{
    //搜索
    search(){
      this.$emit('transSearchStudents',this.searchData);
      this.$emit('getStudents')
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
